Skip to content

Build system improvements#21

Merged
kamalesh-babulal merged 4 commits into
linux-ras:masterfrom
guillemj:pu/build-sys
Dec 3, 2020
Merged

Build system improvements#21
kamalesh-babulal merged 4 commits into
linux-ras:masterfrom
guillemj:pu/build-sys

Conversation

@guillemj
Copy link
Copy Markdown
Contributor

This adds a libsysfs.pc file, derived from the one used in Debian for pkg-config use. Fixes a silent rule for test.h. Moves the unit tests into a more appropriate automake variable. Fixes out-of-tree build support.

Comment thread lib/libsysfs.pc.in Outdated
@@ -0,0 +1,11 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=#libdir@
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for improving the build, a minor nit-pick libdir=#libdir@ should be libdir=@libdir@

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah! Thanks, fixed now, seems I missed that when checking the generated output. :)

The .pc are a better replacement for library detection and linking
usage, than libtool .la files or hardcoding the flags in the using
code.
Use the generic automake silent prefix macros for this file.
These are unit tests which should not end up installed on the system,
and should not be built as part of «make all». These will be built as
part of «make check» instead.

Ideally they would also be executed as part of the test suite, but they
currently depend on the host systems' sysfs.
In out-of-tree builds the current directory is the build directory which
is different to the source directory.

As a consequence this also fixes «make distcheck» to work.
@kamalesh-babulal kamalesh-babulal merged commit 4d072f6 into linux-ras:master Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants